home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1996 #6 / Amiga Plus CD - 1996 - No. 06.iso / pd / netz / amigancp1.8 / developer / include / libraries / ncplib.h
C/C++ Source or Header  |  1995-11-08  |  4KB  |  122 lines

  1. #ifndef LIBRARIES_NCPLIB_H
  2. #define LIBRARIES_NCPLIB_H
  3.  
  4. /*
  5. **
  6. **  ncp.library
  7. **  -----------
  8. **
  9. */
  10.  
  11. #ifndef EXEC_TYPES_H
  12. #include <exec/types.h>
  13. #endif
  14.  
  15. #define NCP_NAME "amigancp.library"
  16. #define NCP_VERSION 5
  17.  
  18. extern struct Library *NCPBase;
  19.  
  20. /*
  21. ** 'fake' types for intel byte order support 
  22. */
  23. typedef unsigned short IWORD;
  24. typedef unsigned long ILONG;
  25.  
  26. /*
  27. ** Error returns from Read/Write
  28. */
  29.  
  30. #define NCPE_INUSE -1        /* Read/Write already pending */
  31. #define NCPE_ABORTED -2        /* Aborted */
  32. #define NCPE_OFFLINE -3        /* Connection offline */
  33. #define NCPE_INACTIVE -4    /* Channel inactive */
  34. #define NCPE_NOTFOUND -5    /* Remote Process not found */
  35. #define NCPE_RECONNECTED -6 /* Informational warning: Channel has been reconnected */
  36. #define NCPE_NEWUSER -7        /* User process changed! */
  37.  
  38. /*
  39. **    SAS/C Pragmas
  40. */
  41.  
  42. #ifdef __SASC
  43.  
  44. #pragma libcall NCPBase NCP_Rexx 1E 0
  45. #pragma libcall NCPBase NCP_IWORD 24 001
  46. #pragma libcall NCPBase NCP_ILONG 2A 001
  47. #pragma libcall NCPBase NCP_OpenChannel 30 09803
  48. #pragma libcall NCPBase NCP_CloseChannel 36 801
  49. #pragma libcall NCPBase NCP_Read 3C 09803
  50. #pragma libcall NCPBase NCP_BeginRead 42 09803
  51. #pragma libcall NCPBase NCP_CheckRead 48 801
  52. #pragma libcall NCPBase NCP_AbortRead 4E 801
  53. #pragma libcall NCPBase NCP_WaitRead 54 801
  54. #pragma libcall NCPBase NCP_Write 5A 09803
  55. #pragma libcall NCPBase NCP_BeginWrite 60 09803
  56. #pragma libcall NCPBase NCP_CheckWrite 66 801
  57. #pragma libcall NCPBase NCP_AbortWrite 6C 801
  58. #pragma libcall NCPBase NCP_WaitWrite 72 801
  59. #pragma libcall NCPBase NCP_IWORDP 78 9802
  60. #pragma libcall NCPBase NCP_ILONGP 7E 9802
  61. #pragma libcall NCPBase NCP_IWORDPI 84 801
  62. #pragma libcall NCPBase NCP_ILONGPI 8A 801
  63. #pragma libcall NCPBase NCP_private1 90 A01
  64. #pragma libcall NCPBase NCP_ReadSig 96 801
  65. #pragma libcall NCPBase NCP_WriteSig 9c 801
  66. #pragma libcall NCPBase NCP_ibm2iso ae 001
  67. #pragma libcall NCPBase NCP_iso2ibm b4 001
  68. #pragma libcall NCPBase NCP_clnl ba 801
  69. #pragma libcall NCPBase NCP_Fault c0 198004
  70. #pragma libcall NCPBase NCP_LinkRemoteRun c6 09803
  71. #pragma libcall NCPBase NCP_CreatePool cc 21003
  72. #pragma libcall NCPBase NCP_DeletePool d2 801
  73. #pragma libcall NCPBase NCP_AllocPooled d8 0802
  74. #pragma libcall NCPBase NCP_FreePooled de 09803
  75. #pragma libcall NCPBase NCP_tab_ibm2iso e4 0
  76. #pragma libcall NCPBase NCP_tab_iso2ibm ea 0
  77.  
  78. #endif
  79.  
  80. /*
  81. **    ANSI Prototypes
  82. */
  83.  
  84. #ifndef NO_PROTOS
  85.  
  86. IWORD NCP_IWORD( IWORD inval );
  87. ILONG NCP_ILONG( ILONG inval );
  88. APTR NCP_OpenChannel( STRPTR localname, STRPTR remotename, ULONG flags );
  89. VOID NCP_CloseChannel( APTR ncpchannel );
  90. LONG NCP_Read( APTR ncpchannel, APTR buffer, LONG len );
  91. LONG NCP_BeginRead( APTR ncpchannel, APTR buffer, LONG len );
  92. LONG NCP_CheckRead( APTR ncpchannel );
  93. LONG NCP_WaitRead( APTR ncpchannel );
  94. LONG NCP_AbortRead( APTR ncpchannel );
  95. LONG NCP_Write( APTR ncpchannel, APTR buffer, LONG len );
  96. LONG NCP_BeginWrite( APTR ncpchannel, APTR buffer, LONG len );
  97. LONG NCP_CheckWrite( APTR ncpchannel );
  98. LONG NCP_WaitWrite( APTR ncpchannel );
  99. LONG NCP_AbortWrite( APTR ncpchannel );
  100. IWORD NCP_IWORDP( APTR from, APTR to );
  101. ILONG NCP_ILONGP( APTR from, APTR to );
  102. IWORD NCP_IWORDPI( APTR from );
  103. ILONG NCP_ILONGPI( APTR from );
  104. ULONG NCP_ReadSig( APTR ncpchannel );
  105. ULONG NCP_WriteSig( APTR ncpchannel );
  106. UBYTE NCP_iso2ibm( UBYTE isoch );
  107. UBYTE NCP_ibm2iso( UBYTE ibmch );
  108. void NCP_clnl( STRPTR string );
  109. void NCP_Fault( LONG code, STRPTR header, STRPTR buffer, LONG buffersize );
  110. LONG NCP_LinkRemoteRun( STRPTR remotefilename, STRPTR cmdline, ULONG cmdlinelen );
  111. APTR NCP_CreatePool( unsigned long requirements, unsigned long puddleSize,
  112.     unsigned long threshSize );
  113. void NCP_DeletePool( APTR poolHeader );
  114. APTR NCP_AllocPooled( APTR poolHeader, unsigned long memSize );
  115. void NCP_FreePooled( APTR poolHeader, APTR memory, unsigned long memSize );
  116. UBYTE * NCP_tab_ibm2iso( void );
  117. UBYTE * NCP_tab_iso2ibm( void );
  118.  
  119. #endif
  120.  
  121. #endif
  122.